package com.tledu.oop3;

public class Student {
    protected String name;
    private int age;
    private String sex;

    public Student() {

    }

    public Student(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void goToClass(String className) {
        System.out.println(name + "上了" + className);
    }

    public void askForLeave() {
        System.out.println(name + "请假了");
    }

    public final void handInHomework() {
        System.out.println("交作业");
    }
}
